-- GENERATED SPELL FOR [Injured Warsong Mage] --


function spell0_27107(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(34933,pUnit)
pUnit:RegisterEvent('Sorts_27107', 685, 1)
end

function spell1_27107(pUnit, Event) --@Blizzard,n/a--
pUnit:FullCastSpellOnTarget(46195,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27107', 8000, 1)
end

function spell2_27107(pUnit, Event) --@Pyroblast,n/a--
pUnit:FullCastSpellOnTarget(17274,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27107', 18000, 1)
end

function spell3_27107(pUnit, Event) --@Soldier Rescued,n/a--
pUnit:FullCastSpellOnTarget(47968,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27107', 647, 1)
end

function Sorts_27107(pUnit, Event)
local choix_sorts_27107 = math.random(0, 3)
if choix_sorts_27107 == 0 then
pUnit:RegisterEvent('spell0_27107', 1, 1)
end
if choix_sorts_27107 == 1 then
pUnit:RegisterEvent('spell1_27107', 1, 1)
end
if choix_sorts_27107 == 2 then
pUnit:RegisterEvent('spell2_27107', 1, 1)
end
if choix_sorts_27107 == 3 then
pUnit:RegisterEvent('spell3_27107', 1, 1)
end
end

function mob27107_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27107', math.random(1500, 3000), 1)
end

function mob27107_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27107_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27107_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27107, 1, 'mob27107_Action')
RegisterUnitEvent(27107, 2, 'mob27107_Leave')
RegisterUnitEvent(27107, 3, 'mob27107_Kill')
RegisterUnitEvent(27107, 4, 'mob27107_Die')
